package com.tfswx.jcyw.dmzc.service;

import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import lombok.Data;
import org.jetbrains.annotations.NotNull;

@State(
        name = "dmzcDlxx",
        storages = {@Storage("dmzcDlxx.xml")}
)
@Data
public final class DlxxService implements PersistentStateComponent<DlxxService> {

    private boolean isDjtEnable = true;
    private boolean isZjkf = true;
    private final String pslxbm = "534FF7DDC2B04EFBBC8EDA348F6B07F5";
//    private String fwdz;
    private String dlbm;
    private String kl;
    private String rybm;
    private String rymc;
    private String tdmc;
    private String jsbm;
    private String jsmc;
    private boolean isZjzc;

    public static DlxxService getInstance() {
        return ServiceManager.getService(DlxxService.class);
    }

    @Override
    public DlxxService getState() {
        return this;
    }

    @Override
    public void loadState(@NotNull DlxxService state) {
        XmlSerializerUtil.copyBean(state, this);
    }
}
